<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Small_wx_page_configuration.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/mall/Small_wx_page_configuration.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'id',
        footer: 'Foots',
        cnName: '首页配置',
        name: 'Small_wx_page_configuration',
        url: '/SmallWxPageConfigurations/',
        sortName: 'createDate',
      },
      extend: extend,
      editFormFields: {
        carousel: [],
        reserveurl: [],
        isSearch: '',
        buttonSite: '',
        merchants_id: '',
        modifier: '',
        modifierID: '',
        modifyDate: '',
        name: '',
        createDate: '',
        createID: '',
        creator: '',
      },
      editFormOptions: [
        [
          { title: '商户名称', required: true, field: 'name', type: 'select', dataKey: 'mall_Merchant', colSize: 6 },
          { title: '是否开启', required: true, field: 'isSearch', type: 'switch', dataKey: 'enable' },
          { title: '商户编码', field: 'merchants_id', type: 'text', hidden: true },
        ],
        [{ title: '首页轮播图', field: 'carousel', type: 'imgupgrade', multiple: true, maxFile: 5, colSize: 12 }],
        [{ title: '预定轮播图', field: 'reserveurl', type: 'imgupgrade', multiple: true, maxFile: 5, colSize: 12 }],
        [{ title: '按钮组设置', required: true, field: 'buttonSite', type: 'selectList', dataKey: 'banner_type', colSize: 6 }],
      ],
      searchFormFields: {
        carousel: [],
        isSearch: '',
        buttonSite: '',
        merchants_id: '',
        modifier: '',
        modifierID: '',
        modifyDate: '',
        name: '',
        createDate: '',
        createID: '',
        creator: '',
      },
      searchFormOptions: [[{ title: '商户名称', field: 'name', type: 'select', dataKey: 'mall_Merchant' }]],
      columns: [
        { field: 'id', title: '主键', type: 'string', width: 220, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'name', title: '商户名称', bind: { key: 'mall_Merchant', data: [] }, type: 'string', width: 90, align: 'left' },
        { field: 'carousel', title: '首页轮播图', type: 'imgupgrade', width: 220, align: 'left' },
        { field: 'reserveurl', title: '预定轮播图', type: 'imgupgrade', width: 220, align: 'left' },
        { field: 'isSearch', title: '是否开启搜索功能', bind: { key: 'enable', data: [] }, type: 'sbyte', width: 90, align: 'left' },
        {
          field: 'buttonSite',
          title: '按钮组设置',
          bind: { key: 'banner_type', data: [] },
          type: 'string',
          width: 90,
          align: 'left',
          sortable: true,
        },
        { field: 'merchants_id', title: '商户编码', type: 'string', width: 220, align: 'left', hidden: true },
        { field: 'modifier', title: '修改人名称', type: 'string', width: 180, align: 'left', hidden: true },
        { field: 'modifierID', title: '修改人id', type: 'int', width: 90, align: 'left', hidden: true },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 90, align: 'left', sortable: true, hidden: true },
        { field: 'createDate', title: '创建时间', type: 'datetime', width: 90, align: 'left', sortable: true, hidden: true },
        { field: 'createID', title: '创建人id', type: 'int', width: 90, hidden: true, align: 'left', hidden: true },
        { field: 'creator', title: '创建人名称', type: 'string', width: 180, align: 'left', hidden: true },
      ],
      detail: {
        cnName: '#detailCnName',
        columns: [],
        sortName: '',
        key: '',
      },
    }
  },
}
export default vueParam
</script>
